package com.example.demo.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.example.demo.framework.base.BaseRepository;
import com.example.demo.model.Category;

public interface CategoryRepository extends JpaRepository<Category, Long>, JpaSpecificationExecutor<Category>,BaseRepository<Category, Long> {

	
	@Query("from Category c where c.status=?1")
	public List<Category> findByStatus(Integer status);
	
	
	@Query("from Category c where c.categoryID=?1")
	public Category getByCategoryID(String categoryID);

}
